var isString=function(obj){
  return Object.prototype.toString.call(obj)==='[object String]'
}
console.log(isString(124))

var isArray=function(obj){
  return Object.prototype.toString.call(obj)==='[object Array]'
}
console.log(isArray('test'))
var isNumber=function(obj){
  return Object.prototype.toString.call(obj)==='[object Number]'
}

console.log(isNumber('3'))

var isType=function(type){
  return function(obj){
    return Object.prototype.toString.call(obj)==='[object'+type+']'
  }
}
var isString=isType('String')
var isArray=isType('Array')
var isNumber=isType('Number')
console.log(isArray([1,2,3,5]))